package com.henu.acmrating.service;

import com.henu.acmrating.dao.BlogLikeMapper;
import com.henu.acmrating.pojo.BlogLike;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class BlogLikeService{

    @Resource
    private BlogLikeMapper blogLikeMapper;

    
    public int deleteByPrimaryKey(Integer id) {
        return blogLikeMapper.deleteByPrimaryKey(id);
    }

    
    public int insert(BlogLike record) {
        return blogLikeMapper.insert(record);
    }

    
    public int insertOrUpdate(BlogLike record) {
        return blogLikeMapper.insertOrUpdate(record);
    }

    
    public int insertOrUpdateSelective(BlogLike record) {
        return blogLikeMapper.insertOrUpdateSelective(record);
    }

    
    public int insertSelective(BlogLike record) {
        return blogLikeMapper.insertSelective(record);
    }

    
    public BlogLike selectByPrimaryKey(Integer id) {
        return blogLikeMapper.selectByPrimaryKey(id);
    }

    
    public int updateByPrimaryKeySelective(BlogLike record) {
        return blogLikeMapper.updateByPrimaryKeySelective(record);
    }

    
    public int updateByPrimaryKey(BlogLike record) {
        return blogLikeMapper.updateByPrimaryKey(record);
    }

    
    public int updateBatch(List<BlogLike> list) {
        return blogLikeMapper.updateBatch(list);
    }

    
    public int batchInsert(List<BlogLike> list) {
        return blogLikeMapper.batchInsert(list);
    }

    public List<Integer> selectBlogIdByUserIdAndIsLike(Integer userId) {
        return blogLikeMapper.selectBlogIdByUserIdAndIsLike(userId);
    }



    public int updateIsLikeByBlogIdAndUserId(BlogLike record) {
        return blogLikeMapper.updateIsLikeByBlogIdAndUserId(record);
    }



    public BlogLike selectOneByAll(BlogLike blogLike) {
        return blogLikeMapper.selectOneByAll(blogLike);
    }

    public List<BlogLike> selectByUserId(Integer userId) {
        return blogLikeMapper.selectByUserId(userId);
    }

    public BlogLike selectOneByUserIdAndBlogId(BlogLike blogLike) {
        return blogLikeMapper.selectOneByUserIdAndBlogId(blogLike);
    }
}
